package com.chenfubing.ps.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author chenfubing
 * @since 2020-05-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Appointment implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 预约表
     */
    @TableId(value = "appointment_id")
    private Integer appointmentId;

    /**
     * 用户id
     */
    @NotNull
    private Integer userId;

    /**
     * 社区id
     */
    @NotNull
    private Integer communityId;

    /**
     * 车位id
     */
    @NotNull
    private Integer spaceId;

    /**
     * 车牌号
     */
    @NotNull
    private String carLicense;

    /**
     * 进入时间
     */
    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime joinTime;

    /**
     * 出场时间
     */
    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime outTime;


}
